<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        let arr = ['111', '131313', '324141', '111', 'wagsgasg'];
        const arr2 = arr
        arr2[0] = "1111"
        // 会一起发生改变

        /* 
                如何去赋值一个对象,复制必须要产生新的对象
                调用slice是时候,会产生一个新的数组对象,从而完成对数组的复制
        */
       arr3 = arr.slice()
       arr3[0] = ["GGG"]
       console.log(arr);
       console.log(arr3);

    </script>
</head>
<body>
    
</body>
</html>